<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/11/7
  Time: 15:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>updateSupplier</title>
    <link href="${pageContext.request.contextPath}/statics/layui/layui/css/layui.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/statics/layui/layui/layui.js" charset="utf-8"></script>
</head>
<body>
    <div style="margin-top: 25px">
        <form class="layui-form" action="${pageContext.request.contextPath}/supplier/updateSupplier/${supplier.id}" method="post" style="width: 100%" enctype="multipart/form-data">
            <div class="layui-form-item">
                <label class="layui-form-label">供货商编号：</label>
                <div class="layui-input-inline">
                    <input type="text" name="supCode" id="supCode" value="${supplier.supCode}" lay-verify="required" placeholder="请输入供货商编号" autocomplete="off" class="layui-input">
                    <span style="color: red">${supCodeError}</span>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">供货商名称：</label>
                <div class="layui-input-inline">
                    <input type="text" name="supName" id="supName" value="${supplier.supName}" lay-verify="required" placeholder="请输入供货商名称" autocomplete="off" class="layui-input">
                    <span style="color: red">${supNameError}</span>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">供货商描述：</label>
                <div class="layui-input-inline">
                    <input type="text" name="supDesc" id="supDesc" value="${supplier.supDesc}" lay-verify="required" placeholder="请输入供货商描述" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">供货商联系人：</label>
                <div class="layui-input-inline">
                    <input type="text" name="supContact" id="supContact" value="${supplier.supContact}" lay-verify="required" placeholder="请输入供货商联系人" autocomplete="off" class="layui-input">
                    <span style="color: red">${supContactError}</span>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">联系电话：</label>
                <div class="layui-input-inline">
                    <input type="text" name="supPhone" id="supPhone" value="${supplier.supPhone}" lay-verify="required" placeholder="请输入联系电话" autocomplete="off" class="layui-input">
                    <span style="color: red">${supPhoneError}</span>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">供货商地址：</label>
                <div class="layui-input-inline">
                    <input type="text" name="supAddress" id="supAddress" value="${supplier.supAddress}" lay-verify="required" placeholder="请输入供货商地址" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">传真：</label>
                <div class="layui-input-inline">
                    <input type="text" name="supFax" id="supFax" value="${supplier.supFax}" lay-verify="required" placeholder="请输入传真" autocomplete="off" class="layui-input">
                    <span style="color: red">${supFaxError}</span>
                </div>
            </div>

            <div>
                <label class="layui-form-label">图片：</label>
                <img src="${pageContext.request.contextPath}/statics/supImg/${supplier.idpicpath}" width="70" height="60" alt=""><br><br>
                <label class="layui-form-label">修改为：</label>
                <input type="file" name="idPic">
            </div>
            <hr>

            <div class="layui-block">
                <div class="layui-input-block">
                    <button type="submit" class="layui-btn" lay-submit="" >确 定</button>
                </div>
            </div>
        </form>
    </div>

    <script>

        layui.use(['layer'], function(){
            var layer = layui.layer;

            if (${msg==true}){
                layer.msg("修改成功",{
                    icon: 1,
                    time: 1000
                })
            }else if (${msg==false}){
                layer.msg("修改失败",{
                    icon: 2,
                    time: 1000
                })
            }

        });

    </script>

</body>
</html>













